<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>留言列表 - bjyadmin</title>
    <bootstrapcss />
    <style>

        .pages a,.pages span {
            display:inline-block;
            padding:2px 5px;
            margin:0 1px;
            border:1px solid #f0f0f0;
            -webkit-border-radius:3px;
            -moz-border-radius:3px;
            border-radius:3px;
        }
        .pages a,.pages li {
            display:inline-block;
            list-style: none;
            text-decoration:none; color:#58A0D3;
        }
        .pages a.first,.pages a.prev,.pages a.next,.pages a.end{
            margin:0;
        }
        .pages a:hover{
            border-color:#50A8E6;
        }
        .pages span.current{
            background:#50A8E6;
            color:#FFF;
            font-weight:700;
            border-color:#50A8E6;
        }
    </style>
</head>
<body>
<!-- 导航栏开始 -->
<div class="bjy-admin-nav">
    <a href="{:U('Admin/Index/index')}"><i class="fa fa-home"></i> 首页</a>
    &gt;
    留言列表
</div>
<!-- 导航栏结束 -->
<ul id="myTab" class="nav nav-tabs">
    <li class="active">
        <a href="#home" data-toggle="tab">留言列表</a>
    </li>
</ul>


<div id="myTabContent" class="tab-content">
    <div class="tab-pane fade in active" id="home">
        <table class="table table-striped table-bordered table-hover table-condensed">
            <tr>
                <th>留言内容</th>
                <th>操作</th>
            </tr>
            <foreach name="data" item="v" >
                <tr>
                    <td>{$v['content']}</td>
                    <td>
                        <a href="javascript:if(confirm('确定删除？'))location='{:U('Admin/Message/delete',array('id'=>$v['msid']))}'">删除</a>
                    </td>
                </tr>
            </foreach>
        </table>
    </div>
    <!-- 列表分页开始 -->
    <div class="row">
        <div class="col-xs-12 col-md-12 col-lg-12 b-page pages text-left">
            {$page}
        </div>
    </div>
    <!-- 列表分页结束 -->
</div>


<bootstrapjs />
<script>
    // 添加菜单
    function add(){
        $("input[name='title'],input[name='name']").val('');
        $("input[name='pid']").val(0);
        $('#bjy-add').modal('show');
    }

    // 添加子菜单
    function add_child(obj){
        var ruleId=$(obj).attr('ruleId');
        $("input[name='pid']").val(ruleId);
        $("input[name='title']").val('');
        $("input[name='name']").val('');
        $('#bjy-add').modal('show');
    }

    // 修改菜单
    function edit(obj){
        var ruleId=$(obj).attr('ruleId');
        var ruletitle=$(obj).attr('ruletitle');
        var ruleName=$(obj).attr('ruleName');
        $("input[name='id']").val(ruleId);
        $("input[name='rname']").val(ruletitle);
        $("input[name='ralias']").val(ruleName);
        $('#bjy-edit').modal('show');
    }
</script>
</body>
</html>
